<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    {{name}}
</div>
<script src="vue.js"></script>
<script>
    //router + vue-resource + vue
    var vm = new Vue({
        data:{
            name:'hello'
        },
        created: function () {
            alert('实例已经创建');
        },
        beforeCompile: function () {
            alert('编译之前');
        },
        compiled: function () {
            alert('编译后');
        },
        ready: function () {
            alert('插入到文档里');
        },
        beforeDestroy: function () {
            alert('销毁之前');
        },
        destroyed: function () {
            alert('销毁完成');
        }
    });
    //手动挂载指定元素
    vm.$mount('#app');
    //销毁实例
    //vm.$destroy();
</script>
</body>
</html>